package vista;

import java.awt.BorderLayout;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;

import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.SoftBevelBorder;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import clasesCreadas.JPanelImagen;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaDetallarVenta extends javax.swing.JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	private JButton btnLimpiar;
	private JButton btnEliminar;
	private JButton btnBuscar;
	private JButton btnSalir;
	private VJButtonImg btnAtras;
	private JLabel lblTotal;
	private JPanel pnlFiscal;
	private ButtonGroup bgFacturado;
	private JLabel lblFiscal;
	private ButtonGroup bgTipoPago;
	private JRadioButton rbFacturadoNo;
	private JRadioButton rbFacturadoSi;
	private JRadioButton rbCredito;
	private JRadioButton rbContado;
	private JLabel lblTipoPago;
	private JPanel pnlTipoPago;
	private JTextField txtIdCliente;
	private JLabel lblIdCliente;
	private JLabel lblTotalFloat;
	private JList listBusqueda;
	private JScrollPane spItemBusqueda;
	private JTextField txtCliente;
	private JLabel lblCliente;
	private JButton btnGuardar;
	private JPanelImagen pnlimagen2;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VentanaDetallarVenta inst = new VentanaDetallarVenta();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VentanaDetallarVenta() {
		super(" Detallar Venta                                                           Copy David C.A J-29901186-0");
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setResizable(false);
			{
				pnlimagen2 = new JPanelImagen("pantalla.jpg");
				getContentPane().add(pnlimagen2, BorderLayout.NORTH);
				pnlimagen2.setLayout(null);
				//pnlimagen2.setBounds(10, 15, 150, 95);
				pnlimagen2.setPreferredSize(new java.awt.Dimension(687, 594));
				pnlimagen2.setBackground(new java.awt.Color(77,77,77));
				{
					btnGuardar = new VJButtonImg("","Guardar   F2");
					pnlimagen2.add(btnGuardar);
					btnGuardar.setBounds(134, 473, 93, 44);
					btnGuardar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/Guardar.png")));
				}
				{
					btnLimpiar = new VJButtonImg("","limpiar   F8");
					pnlimagen2.add(btnLimpiar);
					btnLimpiar.setBounds(270, 473, 93, 44);
					btnLimpiar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/Borrar.png")));
				}
				{
					btnSalir = new VJButtonImg("","Salir   F10");
					pnlimagen2.add(btnSalir);
					btnSalir.setBounds(549, 475, 93, 44);
					btnSalir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/Salir.png")));
				}
				{
					btnBuscar = new VJButtonImg("","Buscar");
					pnlimagen2.add(btnBuscar);
					btnBuscar.setBounds(594, 40, 81, 41);
					btnBuscar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/Buscar.png")));
				}
				{
					btnEliminar = new VJButtonImg("","Eliminar   F12");
					pnlimagen2.add(btnEliminar);
					btnEliminar.setBounds(409, 475, 93, 44);
					btnEliminar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/Eliminar.png")));
				}
				{
					lblCliente = new JLabel();
					lblCliente.setText("Cliente");
					lblCliente.setBounds(298, 54, 56, 16);
					pnlimagen2.add(lblCliente);	
				}
				{
					txtCliente = new JTextField();
					txtCliente.setBounds(354, 44,228, 35);
					pnlimagen2.add(txtCliente);	
				}
				{
					spItemBusqueda = new JScrollPane();
					spItemBusqueda.setBounds(354, 73, 228, 111);
					pnlimagen2.add(spItemBusqueda);
					spItemBusqueda.setVisible(false);
					{
						ListModel listBusquedaModel = 
								new DefaultComboBoxModel(
										new String[] { });
						listBusqueda = new JList();
						pnlimagen2.add(listBusqueda);
						listBusqueda.setModel(listBusquedaModel);
						listBusqueda.setBounds(360, 79, 217, 35);
					}
					spItemBusqueda.setViewportView(listBusqueda);
					listBusqueda.setVisible(false);
				}
					{
						lblTotal = new JLabel();
						pnlimagen2.add(lblTotal);
						lblTotal.setText("Total:");
						lblTotal.setBounds(276, 379, 75, 18);
						lblTotal.setForeground(new java.awt.Color(255,0,0));
						lblTotal.setFont(new java.awt.Font("Nimbus Mono L",3,20));
					}
					{
						lblTotalFloat = new JLabel();
						pnlimagen2.add(lblTotalFloat);
						lblTotalFloat.setText("0.00");
						lblTotalFloat.setBounds(351, 379, 69, 18);
						lblTotalFloat.setFont(new java.awt.Font("Bitstream Charter",0,14));
					}
					{
						btnAtras = new VJButtonImg("", "Atras   F1");
						pnlimagen2.add(btnAtras);
						btnAtras.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/Adelante.png")));
						btnAtras.setBounds(407, 365, 93, 44);
					}
					{
						lblIdCliente = new JLabel();
						pnlimagen2.add(lblIdCliente);
						lblIdCliente.setText("Rif");
						lblIdCliente.setBounds(298, 113, 27, 15);
					}
					{
						txtIdCliente = new JTextField();
						pnlimagen2.add(txtIdCliente);
						txtIdCliente.setBounds(354, 102, 146, 35);
					}
					{
						pnlTipoPago = new JPanel();
						pnlimagen2.add(pnlTipoPago);
						pnlTipoPago.setBounds(120, 203, 205, 88);
						pnlTipoPago.setLayout(null);
						pnlTipoPago.setBackground(new java.awt.Color(247,235,235));
						pnlTipoPago.setBorder(BorderFactory.createTitledBorder(""));
						{
							lblTipoPago = new JLabel();
							pnlTipoPago.add(lblTipoPago);
							lblTipoPago.setText("Tipo de pago");
							lblTipoPago.setForeground(new java.awt.Color(254,5,5));
							lblTipoPago.setBounds(67, 6, 93, 19);
							lblTipoPago.setBackground(new java.awt.Color(214,217,223));
						}
						{
							rbContado = new JRadioButton();
							pnlTipoPago.add(rbContado);
							rbContado.setText("Contado");
							rbContado.setBounds(17, 45, 78, 18);
							getBgTipoPago().add(rbContado);
							getBgTipoPago().add(rbContado);
						}
						{
							rbCredito = new JRadioButton();
							pnlTipoPago.add(rbCredito);
							rbCredito.setText("Credito");
							rbCredito.setBounds(125, 45, 74, 18);
							getBgTipoPago().add(rbCredito);
							getBgTipoPago().add(rbCredito);
						}
					}
					{
						pnlFiscal = new JPanel();
						pnlimagen2.add(pnlFiscal);
						pnlFiscal.setBounds(452, 203, 204, 88);
						pnlFiscal.setLayout(null);
						pnlFiscal.setBorder(BorderFactory.createTitledBorder(""));
						pnlFiscal.setBackground(new java.awt.Color(247,235,235));
						{
							lblFiscal = new JLabel();
							pnlFiscal.add(lblFiscal);
							lblFiscal.setText("Facturado");
							lblFiscal.setBounds(76, 10, 74, 15);
							lblFiscal.setForeground(new java.awt.Color(231,2,2));
							lblFiscal.setBackground(new java.awt.Color(214,217,223));
						}
						{
							rbFacturadoSi = new JRadioButton();
							pnlFiscal.add(rbFacturadoSi);
							rbFacturadoSi.setText("Si");
							rbFacturadoSi.setBounds(47, 47, 50, 18);
							getBgFacturado().add(rbFacturadoSi);
						}
						{
							rbFacturadoNo = new JRadioButton();
							pnlFiscal.add(rbFacturadoNo);
							rbFacturadoNo.setText("No");
							rbFacturadoNo.setBounds(131, 46, 49, 18);
							getBgFacturado().add(rbFacturadoNo);
						}
					}

			}
			pack();
			this.setSize(697, 626);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	private ButtonGroup getBgTipoPago() {
		if(bgTipoPago == null) {
			bgTipoPago = new ButtonGroup();
		}
		return bgTipoPago;
	}
	
	private ButtonGroup getBgFacturado() {
		if(bgFacturado == null) {
			bgFacturado = new ButtonGroup();
		}
		return bgFacturado;
	}

}
